package com.base;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.context.annotation.Bean;
/**
 * 为了解决不同的数据源调用各自的mybatisDao的方法
 * @author wdd-think
 * @param <T>
 */
@Component
public class MybatisDaoMap<T>{
	@Resource
	private MybatisDao mybatisDao;
	private Map<String,MybatisDao<T>> map = new HashMap<String,MybatisDao<T>>();
	public Map<String, MybatisDao<T>> getMap() {
		map.put("dao", mybatisDao);
		return map;
	}
//	@Autowired
	public void setMap(Map<String, MybatisDao<T>> map) {
//		this.map.put("dao", mybatisDao);
		this.map = map;
	}
	
}
